<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <!-- div#app>ul>li -->
    <div id="app">
        <p v-if="models.length==0">该班级没有学生</p>
        <ul v-else>
            <li v-for="model in models" :key="model.id">
                {{ model.id }}.{{model.name}}.{{model.age}}.{{model.gender}}
            </li>
        </ul>
    </div>
    <script src="../assets/vue2.js"></script>
    <script>
        const app = new Vue({
            el: '#app', data() {
                return {
                    models: [
                        { 'id': 1, 'name': '小明', 'age': '32', 'gender': '男' },
                        { 'id': 2, 'name': '小华', 'age': '22', 'gender': '男' },
                        { 'id': 3, 'name': '小花', 'age': '28', 'gender': '女' }
                    ]
                }
            },
        })
    </script>
</body>

</html>